<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@include file="/inc/taglibs.jsp" %>
<script>
function del(id){
	if(confirm("确定要删除此条数据？")==true){
		$.ajax({url:path+"/website/delete?ids="+id,dataType:'json',success:function(msg){
			if(msg.stat=='S')
			middelbodyReload();
			showTip(msg.msg,null,1);
		}});
	}
}
function delall(){
	var $ck=$(".ck:checked");
	if($ck.length>0){
		if(confirm("确定要删除此条数据？")==true){
			$.ajax({url:path+"/website/delete",data:$("#form1").serialize(),dataType:'json',success:function(msg){
				if(msg.stat=='S')
				middelbodyReload();
				showTip(msg.msg,null,1);
			}});
		}
	}else{
		alert("未选择数据！");
	}
}
function edit(id){
	mbloadPage("/website/update/"+id,null,"编辑网址信息");
}
function seeShoulu(id){
	mbloadPage("/downloadurl/list/?websiteid="+id,null,"查看捕获结果");
}
function fenxi(id){
	showLoading();
	$.ajax({url:path+'/website/fenxi/'+id,dataType:'json',success:function(msg){
		if(msg.stat=="S"){
			
		}
		showTip(msg.msg,null,1);
	},error:function(e){alert("访问发生异常\n"+e);}});
}
</script>
<form id="form1" action="${path }/website/list" method="post" onsubmit="return pageSeach(this);">
<c:set var="formId" value="form1"/>
标题<input type="text" name="title" value="${title }">关键字<input type="text" name="keyword" value="${keyword }">网址<input type="text" name="url" value="${url }"> <button type="submit"">查询</button>
<table class="listtable" cellpadding="0" cellspacing="0">
<thead>
<tr>
<td colspan="100%">
<button onclick="delall();" type="button">删除</button>
</td>
</tr>
<tr  style="background-color:#fff494;">
<th width="10px"><label><input type="checkbox" for="ck" onclick="checkall(this);">全选</label></th>
<th>标题</th>
<th>关键字</th>
<th width="100px;">操作</th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.data }" var="item" varStatus="stat">
<tr>
<td><input type="checkbox" name="ids" value="${item.id}" class="ck"></td>
<td><a href="${item.url}" target="_blank">${item.title}</a></td>
<td>${item.keyword}</td>
<td><a href="javascript:del(${item.id});">删除</a>
<a href="javascript:edit(${item.id});">编辑</a>
<a href="javascript:fenxi(${item.id});">分析</a>
<a href="javascript:seeShoulu(${item.id});">查看捕获</a>
</td>
</tr>
</c:forEach>
</tbody>
<tfoot>
<tr>
<td colspan="100%">
<%@include file="/inc/page.jsp" %>
</td>
</tr>
</tfoot>
</table>
</form>
